<% title "#{@platform_name} Packages without licenses - Libraries.io" %>
<% description "Help the community by encouraging the authors to add a LICENSE file to their #{@platform_name} packages." %>
<div class="row">
  <h1><i class="fa fa-copyright"></i> <%= @platform_name %> Packages without licenses</h1>
</div>
<hr>

<div class="row">
  <div class="col-sm-8">
    <% @projects.each do |project| %>
      <div class="row">
        <div class='col-xs-8'>
          <%= render project %>
        </div>
        <div class="col-xs-4">
          <br>
          <% if project.repository.try(:url) %>
            <%= link_to project.repository.try(:url), class: 'btn btn-primary' do %>
            Suggest a License
            <% end %>
          <% end %>
          <% if current_user && current_user.admin? %>
            <%= link_to admin_project_path(project.id), class: 'btn' do %>
              <%= fa_icon 'gear' %>
            <% end %>
          <% end %>
        </div>
      </div>
    <% end %>
    <%= will_paginate @search, page_links: false %>
    <p>
      <small><%= page_entries_info @search, model: 'packages without licenses' %></small>
    </p>
  </div>
  <div class="col-sm-4 facets">
    <h3>
      <strong>
        What's the deal with licenses?
      </strong>
    </h3>
    <p>
      Over <strong>30%</strong> of all open source packages published aren't licensed correctly, by using a package in your code that doesn't have a license you could be in breach of copyright.
    </p>
    <p>
      Theoretically the author could assert copyright at any time and demand that you stop using their code.
    </p>
    <p>
      Code without an explicit license is protected by copyright and is by default All Rights Reserved. The person or people who wrote the code are protected as such. Any time you're using software you didn't write, licensing should be considered and abided.
    </p>
    <p>
      This is a list of the most popular/important packages that we couldn't find a license for. You can help the community by encouraging the authors to add a <code>LICENSE</code> file to their repositories.
    </p>
    <p>
      Find out more about open source licensing at <%= link_to 'ChooseALicense.com','http://choosealicense.com/' %>
    </p>
    <h3>
      <strong>
        Filter by package manager
      </strong>
    </h3>
    <% @facets.each do |name, facet| %>
      <% facet = facet[facet.keys.last] %>
      <% next if facet.buckets.empty? %>
      <%= render 'search/facet', name: name, facet: facet %>
    <% end %>

  </div>
</div>
